package com.group525.cloudef.entity.admin;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("a_articles")
@ApiModel(value = "文章实体类" ,description = "文章所需的属性")
public class Article implements Serializable {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(hidden = true)
    private Long id;
    @ApiModelProperty(value = "文章标题",required = true)

    private String title;
    @ApiModelProperty(value = "文章内容",required = true)
    private String content;

    @ApiModelProperty(value = "发布时间")
    @TableField(fill = FieldFill.INSERT )
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE )
    private Date updateTime;

    @ApiModelProperty(value = "是否发布")
//    @TableLogic
    private int status;
}
